package cn.appsys.pojo;

import java.util.List;

public class Page {
    private Integer currPageNo;
    private Integer pageSize;
    private Integer totalCount;
    private Integer totalPageCount;
    private List<?> list;

    public Integer getCurrPageNo() {
        return currPageNo;
    }

    public void setCurrPageNo(Integer currPageNo) {
        this.currPageNo = currPageNo;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Integer totalCount) {
        if(totalCount>0) {
            this.totalCount = totalCount;
            this.totalPageCount=this.totalCount%this.pageSize==0?
                    this.totalCount/this.pageSize:
                    this.totalCount/this.pageSize+1;
        }
    }

    public Integer getTotalPageCount() {
        return totalPageCount;
    }

    public void setTotalPageCount(Integer totalPageCount) {
        this.totalPageCount = totalPageCount;
    }

    public List<?> getList() {
        return list;
    }

    public void setList(List<?> list) {
        this.list = list;
    }
}
